//
// Copyright (c) 2011 Alex Nesterenko
//

#ifndef NANE_STDFILESYSTEMIMPL__H
#   define  NANE_STDFILESYSTEMIMPL__H

#   include "nane/core/crt/FileSystem.h"
#   include "nane/core/SubSystemProduct.h"

namespace nane 
{
    class StdReadFile;
    class StdWriteFile;
    
    class FileSystem::Implementation
        : public IFileSystem
        , public SubSystemProductFactory<StdReadFile, FileSystem::Implementation, IReadFile>
        , public SubSystemProductFactory<StdWriteFile, FileSystem::Implementation, IWriteFile>        
    {
    public:
        Implementation();
        ~Implementation();
        
    public:
        bool initialize();
        void shutdown();
        IReadFile* openReadFile( const char* _filename );
        IWriteFile* openWriteFile( const char* _filename );
        bool exists( const char* _filename );
        bool deleteFile( const char* _filename );
        bool createFolder( const char* _path );
        bool deleteFolder( const char* _path );
        void release( StdReadFile* _stdReadFile );
        void release( StdWriteFile* _stdWriteFile );        
    };
}   // namespace nane

#endif	// NANE_STDFILESYSTEMIMPL__H
